package model.entity;

import java.util.Collection;
import java.util.List;

public class Quan {
    private int maquan;
    private String tenquan;
    private String ghichu;
    private boolean isActive;
    List<PhongTro> phongtroList = null;

    public List<PhongTro> getPhongtroList() {
        return phongtroList;
    }

    public void setPhongtroList(List<PhongTro> phongtroList) {
        this.phongtroList = phongtroList;
    }

    public Quan(int maquan, String tenquan, String ghichu, boolean isActive) {
        this.maquan = maquan;
        this.tenquan = tenquan;
        this.ghichu = ghichu;
        this.isActive = isActive;
    }

    public Quan() {
    }

    public int getMaquan() {
        return maquan;
    }

    public void setMaquan(int maquan) {
        this.maquan = maquan;
    }

    public String getTenquan() {
        return tenquan;
    }

    public void setTenquan(String tenquan) {
        this.tenquan = tenquan;
    }

    public String getGhichu() {
        return ghichu;
    }

    public void setGhichu(String ghichu) {
        this.ghichu = ghichu;
    }

    public boolean isIsActive() {
        return isActive;
    }

    public void setIsActive(boolean isActive) {
        this.isActive = isActive;
    }

    public Collection getId() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public boolean equals(Object obj) {
        try {
            Quan quan = (Quan)obj;
            if(quan.getMaquan() == this.maquan)
                return true;
        } catch (Exception e) {
            return false;
        }
        return super.equals(obj); //To change body of generated methods, choose Tools | Templates.
    }
    
    
}
